package se.hrbustrc.hlgshopping.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 订单信息表
 * @TableName tb_order_info
 */
@TableName(value ="tb_order_info")
@Data
public class OrderInfo implements Serializable {
    /**
     * 订单ID
     */
    @TableId(value = "FId",type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    @TableField(value = "FOrderNo")
    private String orderno;

    /**
     * 用户ID
     */
    @TableField(value = "FUserId")
    private Long userid;

    /**
     * 支付方式：1-在线支付，2-货到付款
     */
    @TableField(value = "FPayType")
    private Integer paytype;

    /**
     * 订单状态：1-待付款，2-待发货，3-待收货，4-待评价，5-已完成，6-已取消
     */
    @TableField(value = "FOrderState")
    private Integer orderstate;

    /**
     * 支付截止时间
     */
    @TableField(value = "FPayLatestTime")
    private LocalDateTime paylatesttime;

    /**
     * 运费
     */
    @TableField(value = "FPostFee")
    private BigDecimal postfee;

    /**
     * 实际支付金额
     */
    @TableField(value = "FPayMoney")
    private BigDecimal paymoney;

    /**
     * 订单总金额（不含运费）
     */
    @TableField(value = "FTotalMoney")
    private BigDecimal totalmoney;

    /**
     * 商品总数量
     */
    @TableField(value = "FTotalNum")
    private Integer totalnum;

    /**
     * 配送时间类型：1-不限，2-工作日，3-周末
     */
    @TableField(value = "FDeliveryTimeType")
    private Integer deliverytimetype;

    /**
     * 收货人姓名
     */
    @TableField(value = "FReceiverContact")
    private String receivercontact;

    /**
     * 收货人手机号
     */
    @TableField(value = "FReceiverMobile")
    private String receivermobile;

    /**
     * 省份编码
     */
    @TableField(value = "FProvinceCode")
    private String provincecode;

    /**
     * 城市编码
     */
    @TableField(value = "FCityCode")
    private String citycode;

    /**
     * 区县编码
     */
    @TableField(value = "FCountyCode")
    private String countycode;

    /**
     * 收货详细地址
     */
    @TableField(value = "FReceiverAddress")
    private String receiveraddress;

    /**
     * 支付时间
     */
    @TableField(value = "FPayTime")
    private LocalDateTime paytime;

    /**
     * 发货时间
     */
    @TableField(value = "FConsignTime")
    private LocalDateTime consigntime;

    /**
     * 完成时间
     */
    @TableField(value = "FEndTime")
    private LocalDateTime endtime;

    /**
     * 关闭时间
     */
    @TableField(value = "FCloseTime")
    private LocalDateTime closetime;

    /**
     * 评价时间
     */
    @TableField(value = "FEvaluationTime")
    private LocalDateTime evaluationtime;

    /**
     * 预计到货时间
     */
    @TableField(value = "FArrivalEstimatedTime")
    private LocalDateTime arrivalestimatedtime;

    /**
     * 创建时间
     */
    @TableField(value = "FCreateTime")
    private LocalDateTime createtime;

    /**
     * 更新时间
     */
    @TableField(value = "FUpdateTime")
    private LocalDateTime updatetime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderInfo other = (OrderInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderno() == null ? other.getOrderno() == null : this.getOrderno().equals(other.getOrderno()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getPaytype() == null ? other.getPaytype() == null : this.getPaytype().equals(other.getPaytype()))
            && (this.getOrderstate() == null ? other.getOrderstate() == null : this.getOrderstate().equals(other.getOrderstate()))
            && (this.getPaylatesttime() == null ? other.getPaylatesttime() == null : this.getPaylatesttime().equals(other.getPaylatesttime()))
            && (this.getPostfee() == null ? other.getPostfee() == null : this.getPostfee().equals(other.getPostfee()))
            && (this.getPaymoney() == null ? other.getPaymoney() == null : this.getPaymoney().equals(other.getPaymoney()))
            && (this.getTotalmoney() == null ? other.getTotalmoney() == null : this.getTotalmoney().equals(other.getTotalmoney()))
            && (this.getTotalnum() == null ? other.getTotalnum() == null : this.getTotalnum().equals(other.getTotalnum()))
            && (this.getDeliverytimetype() == null ? other.getDeliverytimetype() == null : this.getDeliverytimetype().equals(other.getDeliverytimetype()))
            && (this.getReceivercontact() == null ? other.getReceivercontact() == null : this.getReceivercontact().equals(other.getReceivercontact()))
            && (this.getReceivermobile() == null ? other.getReceivermobile() == null : this.getReceivermobile().equals(other.getReceivermobile()))
            && (this.getProvincecode() == null ? other.getProvincecode() == null : this.getProvincecode().equals(other.getProvincecode()))
            && (this.getCitycode() == null ? other.getCitycode() == null : this.getCitycode().equals(other.getCitycode()))
            && (this.getCountycode() == null ? other.getCountycode() == null : this.getCountycode().equals(other.getCountycode()))
            && (this.getReceiveraddress() == null ? other.getReceiveraddress() == null : this.getReceiveraddress().equals(other.getReceiveraddress()))
            && (this.getPaytime() == null ? other.getPaytime() == null : this.getPaytime().equals(other.getPaytime()))
            && (this.getConsigntime() == null ? other.getConsigntime() == null : this.getConsigntime().equals(other.getConsigntime()))
            && (this.getEndtime() == null ? other.getEndtime() == null : this.getEndtime().equals(other.getEndtime()))
            && (this.getClosetime() == null ? other.getClosetime() == null : this.getClosetime().equals(other.getClosetime()))
            && (this.getEvaluationtime() == null ? other.getEvaluationtime() == null : this.getEvaluationtime().equals(other.getEvaluationtime()))
            && (this.getArrivalestimatedtime() == null ? other.getArrivalestimatedtime() == null : this.getArrivalestimatedtime().equals(other.getArrivalestimatedtime()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderno() == null) ? 0 : getOrderno().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getPaytype() == null) ? 0 : getPaytype().hashCode());
        result = prime * result + ((getOrderstate() == null) ? 0 : getOrderstate().hashCode());
        result = prime * result + ((getPaylatesttime() == null) ? 0 : getPaylatesttime().hashCode());
        result = prime * result + ((getPostfee() == null) ? 0 : getPostfee().hashCode());
        result = prime * result + ((getPaymoney() == null) ? 0 : getPaymoney().hashCode());
        result = prime * result + ((getTotalmoney() == null) ? 0 : getTotalmoney().hashCode());
        result = prime * result + ((getTotalnum() == null) ? 0 : getTotalnum().hashCode());
        result = prime * result + ((getDeliverytimetype() == null) ? 0 : getDeliverytimetype().hashCode());
        result = prime * result + ((getReceivercontact() == null) ? 0 : getReceivercontact().hashCode());
        result = prime * result + ((getReceivermobile() == null) ? 0 : getReceivermobile().hashCode());
        result = prime * result + ((getProvincecode() == null) ? 0 : getProvincecode().hashCode());
        result = prime * result + ((getCitycode() == null) ? 0 : getCitycode().hashCode());
        result = prime * result + ((getCountycode() == null) ? 0 : getCountycode().hashCode());
        result = prime * result + ((getReceiveraddress() == null) ? 0 : getReceiveraddress().hashCode());
        result = prime * result + ((getPaytime() == null) ? 0 : getPaytime().hashCode());
        result = prime * result + ((getConsigntime() == null) ? 0 : getConsigntime().hashCode());
        result = prime * result + ((getEndtime() == null) ? 0 : getEndtime().hashCode());
        result = prime * result + ((getClosetime() == null) ? 0 : getClosetime().hashCode());
        result = prime * result + ((getEvaluationtime() == null) ? 0 : getEvaluationtime().hashCode());
        result = prime * result + ((getArrivalestimatedtime() == null) ? 0 : getArrivalestimatedtime().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderno=").append(orderno);
        sb.append(", userid=").append(userid);
        sb.append(", paytype=").append(paytype);
        sb.append(", orderstate=").append(orderstate);
        sb.append(", paylatesttime=").append(paylatesttime);
        sb.append(", postfee=").append(postfee);
        sb.append(", paymoney=").append(paymoney);
        sb.append(", totalmoney=").append(totalmoney);
        sb.append(", totalnum=").append(totalnum);
        sb.append(", deliverytimetype=").append(deliverytimetype);
        sb.append(", receivercontact=").append(receivercontact);
        sb.append(", receivermobile=").append(receivermobile);
        sb.append(", provincecode=").append(provincecode);
        sb.append(", citycode=").append(citycode);
        sb.append(", countycode=").append(countycode);
        sb.append(", receiveraddress=").append(receiveraddress);
        sb.append(", paytime=").append(paytime);
        sb.append(", consigntime=").append(consigntime);
        sb.append(", endtime=").append(endtime);
        sb.append(", closetime=").append(closetime);
        sb.append(", evaluationtime=").append(evaluationtime);
        sb.append(", arrivalestimatedtime=").append(arrivalestimatedtime);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}